#ifndef SERVER_MESSAGE_HANDLER_H
#define SERVER_MESSAGE_HANDLER_H

#include<QObject>
#include"message.h"
#include"server_network.h"

class ServerMessageHandler : public QObject{
    Q_OBJECT
public:
    explicit ServerMessageHandler(ServerNetwork *network,QObject *parent=nullptr);
    ~ServerMessageHandler();
private slots:
    void handleMessage(const Message &message);

private:
    // 指向服务端网络模块的指针
    ServerNetwork *network;
    // 发送响应消息的私有函数
    void sendResponse(const Message &response);
};

#endif // SERVER_MESSAGE_HANDLER_H
